#ifndef TRAYTYPESHOW_H
#define TRAYTYPESHOW_H

#include <QWidget>
#include <QPainter>

namespace Ui {
class TrayTypeShow;
}

class TrayTypeShow : public QWidget
{
    Q_OBJECT

public:
    explicit TrayTypeShow(QWidget *parent = nullptr);
    ~TrayTypeShow();
    void paintEvent(QPaintEvent *);

    void SetTrayType(int type);
    void SetDripNum(int num);
    void SetDropType(int Type);
    void SetDropArea(int Type);
    unsigned char  GetTrayType(void);

    int Tray_Type;
    int Drop_Type;
    int DropNum;
    int DropArea;

private:
    Ui::TrayTypeShow *ui;

    //定时器
    int id1,id2;
    int Rows_of_TrayType_1;
    int Columns_of_TrayType_1;
    int Rows_of_TrayType_2;
    int Columns_of_TrayType_2;
    int Rows_of_TrayType_3;
    int Columns_of_TrayType_3;

    //修改
    int x_cnt, y_cnt;

    void Drawtray();
    void DrawDrip(int x, int y);


    // QWidget interface
protected:
    void mousePressEvent(QMouseEvent *event);
    void timerEvent(QTimerEvent *e);

};

#endif // TRAYTYPESHOW_H
